<!--
 * @Author: Wangtao
 * @Date: 2022-05-18 00:49:02
 * @LastEditors: Wangtao
 * @LastEditTime: 2022-05-18 01:01:05
-->
<template>
  <div class="select-box">
    <el-button size="mini" :type="item.value === value ? 'primary' : ''" v-for="item in typeList" :key="item.value" @click="selectChange(item.value)">{{item.label}}</el-button>
  </div>
</template>
<script>
  export default {
    name: 'kmSearchTypeSelect',
    props: {
      
    },
    data () {
      return {
        value: 'all',
        typeList: [{
          label: '全部',
          value: 'all'
        },{
          label: '标题',
          value: 'title'
        },{
          label: '内容',
          value: 'content'
        },{
          label: '标签',
          value: 'tag'
        }]
      }
    },
    methods: {
      selectChange(value){
        this.value = value
        this.$emit('change', value);
      }
    }
  }
</script>
<style lang="stylus" scoped>
  @import "../../../assets/common.styl"
  .select-box
    margin: 5px 0 5px
</style>

